package com.chinapost.po;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Tdept entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TDEPT", schema = "YXJF")
public class Tdept implements java.io.Serializable {

	// Fields

	private String cid;
	private Tdept tdept;
	private String cname;
	private Integer cseq;
	private Timestamp ccreatedate;
	private Timestamp cmodifydate;
	private Set<Tyxjl> tyxjls = new HashSet<Tyxjl>(0);
	private Set<Tuser> tusers = new HashSet<Tuser>(0);
	private Set<Twd> twds = new HashSet<Twd>(0);
	private Set<Tjhrw> tjhrws = new HashSet<Tjhrw>(0);
	private Set<Tjfsz> tjfszs = new HashSet<Tjfsz>(0);
	private Set<Ttqsj> ttqsjs = new HashSet<Ttqsj>(0);
	private Set<Tyxsj> tyxsjs = new HashSet<Tyxsj>(0);
	private Set<Tycsj> tycsjs = new HashSet<Tycsj>(0);
	private Set<Tdept> tdepts = new HashSet<Tdept>(0);

	// Constructors

	/** default constructor */
	public Tdept() {
	}

	/** minimal constructor */
	public Tdept(String cid, String cname) {
		this.cid = cid;
		this.cname = cname;
	}

	/** full constructor */
	public Tdept(String cid, Tdept tdept, String cname, Integer cseq, Timestamp ccreatedate, Timestamp cmodifydate, Set<Tyxjl> tyxjls, Set<Tuser> tusers, Set<Twd> twds, Set<Tjhrw> tjhrws, Set<Tjfsz> tjfszs, Set<Ttqsj> ttqsjs, Set<Tyxsj> tyxsjs, Set<Tycsj> tycsjs, Set<Tdept> tdepts) {
		this.cid = cid;
		this.tdept = tdept;
		this.cname = cname;
		this.cseq = cseq;
		this.ccreatedate = ccreatedate;
		this.cmodifydate = cmodifydate;
		this.tyxjls = tyxjls;
		this.tusers = tusers;
		this.twds = twds;
		this.tjhrws = tjhrws;
		this.tjfszs = tjfszs;
		this.ttqsjs = ttqsjs;
		this.tyxsjs = tyxsjs;
		this.tycsjs = tycsjs;
		this.tdepts = tdepts;
	}

	// Property accessors
	@Id
	@Column(name = "CID", unique = true, nullable = false, length = 36)
	public String getCid() {
		return this.cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PID")
	public Tdept getTdept() {
		return this.tdept;
	}

	public void setTdept(Tdept tdept) {
		this.tdept = tdept;
	}

	@Column(name = "CNAME", nullable = false, length = 100)
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@Column(name = "CSEQ", precision = 5, scale = 0)
	public Integer getCseq() {
		return this.cseq;
	}

	public void setCseq(Integer cseq) {
		this.cseq = cseq;
	}

	@Column(name = "CCREATEDATE", length = 11)
	public Timestamp getCcreatedate() {
		return this.ccreatedate;
	}

	public void setCcreatedate(Timestamp ccreatedate) {
		this.ccreatedate = ccreatedate;
	}

	@Column(name = "CMODIFYDATE", length = 11)
	public Timestamp getCmodifydate() {
		return this.cmodifydate;
	}

	public void setCmodifydate(Timestamp cmodifydate) {
		this.cmodifydate = cmodifydate;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tyxjl> getTyxjls() {
		return this.tyxjls;
	}

	public void setTyxjls(Set<Tyxjl> tyxjls) {
		this.tyxjls = tyxjls;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tuser> getTusers() {
		return this.tusers;
	}

	public void setTusers(Set<Tuser> tusers) {
		this.tusers = tusers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Twd> getTwds() {
		return this.twds;
	}

	public void setTwds(Set<Twd> twds) {
		this.twds = twds;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tjhrw> getTjhrws() {
		return this.tjhrws;
	}

	public void setTjhrws(Set<Tjhrw> tjhrws) {
		this.tjhrws = tjhrws;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tjfsz> getTjfszs() {
		return this.tjfszs;
	}

	public void setTjfszs(Set<Tjfsz> tjfszs) {
		this.tjfszs = tjfszs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Ttqsj> getTtqsjs() {
		return this.ttqsjs;
	}

	public void setTtqsjs(Set<Ttqsj> ttqsjs) {
		this.ttqsjs = ttqsjs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tyxsj> getTyxsjs() {
		return this.tyxsjs;
	}

	public void setTyxsjs(Set<Tyxsj> tyxsjs) {
		this.tyxsjs = tyxsjs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tycsj> getTycsjs() {
		return this.tycsjs;
	}

	public void setTycsjs(Set<Tycsj> tycsjs) {
		this.tycsjs = tycsjs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tdept")
	public Set<Tdept> getTdepts() {
		return this.tdepts;
	}

	public void setTdepts(Set<Tdept> tdepts) {
		this.tdepts = tdepts;
	}

}